
//状态的父类, 接口类

import { PlayerStatusMachine } from "./PlayerStatusMachine";

export default class RootStatus {

    machine: PlayerStatusMachine = null;
    spritePlayer: cc.Node = null;

    constructor(ower: PlayerStatusMachine, spritePlayer: cc.Node) {
        this.machine = ower;
        this.spritePlayer = spritePlayer;
    }

    onEnter() {
        this.spritePlayer.getComponent(cc.Animation).off("finished", this.onAnimationFinished, this)
        this.spritePlayer.getComponent(cc.Animation).on("finished", this.onAnimationFinished, this)
    }
    onUpdate(dt: number) {

    }

    onExit() {
        this.spritePlayer.getComponent(cc.Animation).off("finished", this.onAnimationFinished, this)
    }

    onAnimationFinished() {

    }
}
